<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>FLAC 音乐播放器</title>
  </head>
  <body>
    <div id="app"></div>
    <script>
      // 立即检查 window.electronAPI（在 Vue 加载之前）
      console.log('[index] Checking window.electronAPI immediately:', {
        exists: typeof window.electronAPI !== 'undefined',
        hasWindow: typeof window.electronAPI?.window !== 'undefined',
        electronAPI: window.electronAPI
      })
      
      // 定期检查直到找到
      let checkCount = 0
      const checkInterval = setInterval(() => {
        checkCount++
        if (window.electronAPI && window.electronAPI.window) {
          console.log('[index] window.electronAPI found after', checkCount * 100, 'ms')
          clearInterval(checkInterval)
        } else if (checkCount > 50) {
          console.error('[index] window.electronAPI not found after 5 seconds')
          clearInterval(checkInterval)
        }
      }, 100)
    </script>
    <script type="module" src="/src/utils/logo-generator.js"></script>
    <script type="module" src="/src/main.js"></script>
  </body>
</html>

